<?php
header("Content-type:text/html;charset=utf-8");
 //$title = $_GET['info'];
// $funcName =$_GET['funcName'];
 
 if(isset($_POST['info'])){
            $str=$_POST['info'];
            function http_post_json($url, $jsonStr)
                {
                    $ch = curl_init();
                    curl_setopt($ch, CURLOPT_POST, 1);
                    curl_setopt($ch, CURLOPT_URL, $url);
                    curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonStr);
                    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
                    curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                            'Content-Type: application/json; charset=utf-8',
                            'Content-Length: ' . strlen($jsonStr)
                        )
                    );
                    $response = curl_exec($ch);
                    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
                    curl_close($ch);
                    return array($httpCode, $response);
                }
                $url = "http://www.tuling123.com/openapi/api";
                $jsonStr = json_encode(array('key' =>'843e439985a648ac83e702688879eaa4','info'=>$str));
                list($returnCode, $returnContent) = http_post_json($url, $jsonStr);
                echo $returnContent;
      }else{
            $data['msg'] = "参数不对或者没传参数值";
            $json = array('code'=>201,'payload'=>$data); 
            //$this->outPutJson(json_encode($json));
            echo '0';
      }




?>